// 统一管理首页模块接口
import request from "@/utils/request";
import type { aIResponse, chatResponse, reqAIState, reqChatState } from "./type";
import type { AxiosRequestConfig } from "axios";

enum API {
  AI_URL = '/generate',
  CHAT_URL = '/chat'
}

export const reqAi = (data: reqAIState, config?: AxiosRequestConfig) => request.post<reqAIState, aIResponse>(API.AI_URL, data, config)
export const reqChat = (data: reqChatState, config?: AxiosRequestConfig) => request.post<reqChatState, chatResponse>(API.CHAT_URL, data, config)


